package org.exez.modules.visitor.constant;

/**
 * 审核状态
 *
 * @author dtm
 */
public enum ApplicationStatusEnum {
    TJSQ("提交申请", 1),
    SQTG("申请通过", 2),
    FWCG("访问成功", 3),
    SHSB("审核失败", 4),
    FWCS("访问超时", 5);
    private String name;
    private Integer index;

    private ApplicationStatusEnum(String name, Integer index) {
        this.name = name;
        this.index = index;
    }

    public static String getName(Integer index) {
        for (ApplicationStatusEnum c : ApplicationStatusEnum.values()) {
            if (c.getIndex().equals(index)) {
                return c.name;
            }
        }
        return null;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getIndex() {
        return index;
    }

    public void setIndex(Integer index) {
        this.index = index;
    }

}
